<script type="text/javascript">
  function timedRefresh(timeoutPeriod) {
    setTimeout("location.reload(true);",timeoutPeriod);
  }

  function refreshParent() {
    window.opener.location.href = window.opener.location.href;
    if (window.opener.progressWindow){
      window.opener.progressWindow.close()
    }
    window.close();
  }
</script>
<center>
  <span style="font-size: 60px;">
    <%=@sale.player.name%><br/>
    <%if @sale.sold_flag=='Y'%>
      <img src="/images/dice_roll.gif" border="0" width="200px" style="vertical-align: middle;"/>
    <%else%>
      <img src="/images/dice_stop3.jpg" border="0" width="200px" style="vertical-align: middle;"/>
    <%end%>
    <br/><br/>
    Unit Sold : <font color="blue"><%=number_with_delimiter(@sale.quantity)%></font><br/>
    <input type="button" value="Close" onclick="refreshParent();"/>
  </span>
</center>
<script type="text/javascript">
  timedRefresh(5000);
</script>